package com.woniu.liuzhougov.authorityControl.dao;

import com.woniu.liuzhougov.authorityControl.pojo.UserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface UserRoleMapper {
    int deleteByPrimaryKey(Integer userRoleId);

    int insert(UserRole record);

    int insertSelective(UserRole record);

    UserRole selectByPrimaryKey(Integer userRoleId);

    int updateByPrimaryKeySelective(UserRole record);

    int updateByPrimaryKey(UserRole record);

    List<Integer> listRoleIdByUserId(Integer userId);

    int deleteByUserId(@Param("userId") Integer userId, @Param("removeRoleIds") Set<Integer> removeRoleIds);

    int insertByUserId(@Param("userId") Integer userId, @Param("addRoleIds") Set<Integer> addRoleIds);

    int countRecordByRoleId(Integer roleId);
}